String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g, "");
}
function  checkLogin()
{
  var userName =$("#userName");
  if(userName.val().trim().length==0)
  {
     alert("请输入用户名!");
     userName.focus();
     return;
  }l
  var password =$("#password");
   if(password.val().trim().length==0)
  {
     alert("请输入密码!");
     password.focus();
     return;
  }
  $.ajax({
     url:'../../user/forwordLogin.action',
     type:'post',
     data:'tsSysuser.username='+userName.val().trim()+"&tsSysuser.password="+password.val().trim(),
     success:function(msg)
     {
          var result = eval('('+msg+')');
          var b =result['result'];
          if(b==1)
          {
             go('../mem/memInfo.html')
          }
          else if(b==2)
          {
              alert('您的账号还没有被解锁，不能登入');
          }
          else if(b==0)
          {
              alert('登入失败,用户名或密码错误');
          }
     }
  
  });
}
